package com.atguigu.day09.test.o3;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/9 11:01
 * @注释 创建一个Person的子类Student，新建一个变量成绩，并重写getInfo方法
 */
public class Student extends Person {
    private double score;

    @Override
    public String toString() {
        return super.toString() + ", score=" + score;
    }

    /*@Override
    public String getInfo() {
        return super.getInfo() + ", 成绩： " + score;
    }*/

    public Student(String name, int age, char gender, double score) {
        super(name, age, gender);
        this.score = score;
    }

    /*public Student(double score) {
        this.score = score;
    }*/

    public Student() {
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
